load("//ts/svelte:svelte.bzl", "compile_svelte", "svelte_check")
load("//ts:prettier.bzl", "prettier_test")
load("//ts:eslint.bzl", "eslint_test")
load("//ts:typescript.bzl", "typescript")

_ts_deps = [
    "//ts/components",
    "//ts/lib",
    "//ts/domlib",
    "//ts/sveltelib",
    "@npm//@fluent",
    "@npm//svelte",
]

compile_svelte(
    visibility = ["//visibility:public"],
    deps = _ts_deps,
)

typescript(
    name = "tag-editor",
    deps = _ts_deps + [
        ":svelte",
    ],
)

# Tests
################

prettier_test()

eslint_test()

svelte_check(
    name = "svelte_check",
    srcs = glob([
        "**/*.ts",
        "**/*.svelte",
    ]) + _ts_deps + [
        "//sass:button_mixins_lib",
        "@npm//@types/bootstrap",
    ],
)
